<?xml version="1.0" encoding="ISO-8859-1" ?>  
<ui:composition template="/template/layout/mainLayout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:ui="http://java.sun.com/jsf/facelets"  
      xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:p="http://primefaces.org/ui"
	  xmlns:f="http://java.sun.com/jsf/core">
			
<ui:define name="principal">
	<center>
		<h:form id="frmCliente">
			 <p:growl id="growl" showDetail="false" sticky="false" autoUpdate="true" life="3000" />    
			 <p:panelGrid columns="2" id="grid">
				    <f:facet name="header">
				        Dados do Cliente
				    </f:facet>
				
				    <h:outputLabel for="firstname" value="Nome: *" />
				    <p:inputText id="firstname" value="#{clienteMB.cliente.nome}" required="true" label="Nome" />
				
				    <h:outputLabel for="apelido" value="Apelido: *" />
				    <p:inputText id="apelido" value="#{clienteMB.cliente.apelido}" required="true" label="Apelido"/>
				    
				    <h:outputLabel for="email" value="Email: *" />
				    <p:inputText id="email" value="#{clienteMB.cliente.email}" required="true" label="Email" />
				
				    <h:outputLabel for="senha" value="Senha: *" />
				    <p:inputText id="senha" value="#{clienteMB.cliente.senha}" required="true" label="Senha"/>
				
				    <f:facet name="footer">
					     <p:commandButton id="submitButton" action="#{clienteMB.salvar}" value="Salvar" icon="ui-icon-check" style="margin:0" update="growl,:frmCliente:grid "/>  
					     <p:commandButton id="cancelarButton" action="#{clienteMB.cancelar}" value="Cancelar" icon="ui-icon-check" style="margin:0" update="growl,:frmCliente:grid"
					     	rendered="#{clienteMB.selectedCliente != null}"/>  
				    </f:facet>
				</p:panelGrid>
		</h:form>
	</center>	
</ui:define>

</ui:composition>
